package commands

import (
	"project/design/command/recievers"
)

type FanOffCommand struct {
	*recievers.Fan
}

func CreateFanOffCommand(fan *recievers.Fan) *FanOffCommand {
	return &FanOffCommand{fan}
}

func (foc *FanOffCommand) Execute() {
	foc.Off()
}

func (foc *FanOffCommand) Undo() {
	foc.SpecifiedSpeed(foc.GetPreSpeed())
}
